package pers.wensheng.patterns.creator_pattern.builder_pattern.common_usage.builder;

import pers.wensheng.patterns.creator_pattern.builder_pattern.common_usage.entity.Bike;

/**
 *  具体的构建者，ofo单车构建者，用来构建ofo单车
 */
public class OfoBuilder extends Builder {
    /**
     * 构建车架
     */
    @Override
    public void buildFrame() {
        bike.setFrame("铝合金车架");
    }

    /**
     * 构建车座
     */
    @Override
    public void buildSeat() {
        bike.setSeat("橡胶车座");
    }

    /**
     * 构建自行车的方法
     *
     * @return
     */
    @Override
    public Bike createBike() {
        return bike;
    }
}
